package com.dc.system.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dc.common.model.BaseModel;
import com.dc.system.service.SystemService;

@Controller
@RequestMapping("/system")
public class SystemController {
	
	@Autowired
	private SystemService systemService;
	
	/**
	 * 根据当前登陆用户权限显示的一级菜单以及二级菜单列表
	 * @Title: getUserMenu 
	 * @param baseModel
	 * @param request
	 * @return BaseModel
	 * @throws Exception
	 * @author: ShenHJ
	 * Date: 2018年4月12日 下午2:36:36
	 */
	@RequestMapping("/getUserMenu")
	@ResponseBody
	public BaseModel getMenu(BaseModel baseModel, HttpServletRequest request) throws Exception{
		return systemService.getMenu(baseModel, request);
	}
	/**
	 * 根据code值反馈当前页面需要隐藏的按钮id值
	 * @Title: getModuleShowId 
	 * @param baseModel
	 * @param secondModule
	 * @param request
	 * @return
	 * @throws Exception: BaseModel
	 * @author: ShenHJ
	 * Date: 2018年4月23日 上午10:02:28
	 */
	@RequestMapping("/getModuleHiddenIds")
	@ResponseBody
	public BaseModel getModuleHiddenIds(BaseModel baseModel, HttpServletRequest request,int code) throws Exception{
		return systemService.getModuleHiddenIds(baseModel, request,code);
	}
	
}
